#pragma once

#include <QObject>
#include <qlabel.h>
#include <qvariantanimation.h>
#include <qmediaplayer.h>
#include <qpixmap.h>

class CoverRotateController  : public QObject
{
	Q_OBJECT

public:
	CoverRotateController(QLabel* controllOne,QObject *parent);
	~CoverRotateController();

	void play();
	void pause();
	void stop();

	void setPixmap(const QPixmap& pixmap);
public slots:
	void onOneEpochFinish();
	void setStateByPlayer(QMediaPlayer::State state);
private:
	QLabel* m_label;
	QVariantAnimation* m_animation;
	QPixmap* m_pixmap;
	bool m_isPlaying = false;
	//QBitmap* m_mask;
};
